<{extends file='../layout/layout.phtml'}>
<{block name=content}>
	<link rel="stylesheet" href="/css/index.css">
	<div id='header-slider'>
		<a href="1" id="slider_link">
			<div id="slider-img-contain"  style="background:url('/img/1.jpg') no-repeat scroll center center transparent">
		</div></a>
		<ul id='slider-button'>
			<li num=1 class='active' link='1' imgsrc="/img/1.jpg">1</li>
			<li num=2 link='2' imgsrc="/img/2.jpg">2</li>
			<li num=3 link='3' imgsrc="/img/3.jpg">3</li>
			<li num=4 link='4' imgsrc="/img/4.png">4</li>
			<li num=5 link='5' imgsrc="/img/5.png">5</li>
		</ul>
	</div>
	<div id="content-body" class='clear'>
		<div class='clear'>
			<{foreach $ad_list as $ad}>
				<div class='ad-div <{if (($ad@index+1)%4 == 0)}>ad-div-last<{/if}>'>

					<div class='content-img-contain' style="background:url(/upload/ad/<{$ad['pic']}>) no-repeat center"></div>
					<a href=""><div class='border-div' title="<{$ad['description']}>"></div></a>
				</div>
			<{/foreach}>
			
		</div>
		<div id='index-des' class='clear'>
			<div id="index-des-1">
				<div></div>
				<ul>
					<{foreach $index_article_list as $at}>
					<li><a href="/news-<{$at.typeid}>-<{$at._id}>.html"><{$at.title}></a> <span><{"Y-m-d"|date:$at.addtime}></span></li>
					<{/foreach}>
				</ul>
			</div>
			<div class="in_vision">
	        	<div class="in_vision_tit">惠信愿景</div>
	            <div class="comm in_vision_main">
	            	<div class="in_vm_le"><a target="_blank" href="http://sj.365sji.com/Account/NewsDetail-380.html/"><img src="/img/vision-img.gif"></a></div>
	                <p class="in_vm_ri">
	                <a href=""><b>企业愿景：</b><br>创建营销分支遍及全球80%以上国家各大城市的世界100强企业，打造最受尊重和最有价值的全球企业之一，为人类社会的和谐和平、为人们生活得更加美好贡献力量...</a>
	                </p>
	            </div>
	        </div>
	        <div class="in_intro">
	        	<div class="erweima">
	            	<a href="http://app.365sji.com/" class="erweima-button" target="_blank"></a>
	            </div>
	        </div>
		</div>
	</div>
	<script>
		var n;
		var inter_obj;
		function set_interval(my_num){
			var total_num = $("slider-button").getElements('li').length;

			if(my_num >= 0)
				n = my_num;
			if(my_num == total_num)
				n = 0;
			clearInterval(inter_obj);n++;
			inter_obj = setInterval('click_slider_button('+n+')',10000);
			
		}
		function click_slider_button(li_num){
			set_interval(li_num)
			var li_obj = $("slider-button").getElement("li[num="+li_num+"]");
			$("slider-button").getElements('li').removeClass("active");
			li_obj.addClass('active');
			var img_contain = $("slider-img-contain");
			var img_link_contain = $("slider_link");
			var img_src = li_obj.get('imgsrc');
			var link = li_obj.get('link');
			img_contain.set('styles',{'background':'url('+img_src+') no-repeat scroll center center transparent'});
			img_link_contain.set('href',link);
		}
		//控制轮播
	click_slider_button(1)
	$$("#slider-button li").addEvent('click',function(){
		var li_num = $$(this).get('num');
		click_slider_button(li_num);
	})
	</script>
<{/block}>